// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
import {mixin} from "./mixin"
import plugin from "./plugin"
import ElementUI from 'element-ui'
//引入elementui
import 'element-ui/lib/theme-chalk/index.css'
import vueResource from 'vue-resource'
import Vuex from 'vuex'
import store from './store'


//在Vue中使用element-ui
Vue.use(ElementUI)
Vue.config.productionTip = false
Vue.mixin(mixin)
Vue.use(plugin,1,2,3)
Vue.use(vueResource)
Vue.use(Vuex)
Vue.filter('mySlice', function (value){
  return value.slice(0,5)
})

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>',
  beforeCreate() {
    Vue.prototype.$bus = this //安装全局事件总线
  },
  store
})
